package com.wwj.tem.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import com.wwj.tem.common.Result;
import com.wwj.tem.service.impl.SysRoleServiceImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: wwj
 * @create: 2024/7/28 - 18:26
 * Description:
 */
@RestController
@RequestMapping("/sys/role")
public class SysRoleController {
	@Resource
	private SysRoleServiceImpl roleService;
	
	@ApiOperation("查询所有角色")
	@GetMapping("/search/all")
	@SaCheckPermission("sys:role:read")
	public Result searchAll() {
		return Result.data(roleService.list());
	}
}
